<?php
/**
 * Created by 七月
 * User: 七月
 * Date: 2017/2/18
 * Time: 12:35
 */

namespace app\admin\validate;

use think\Validate;

class OrderRule extends Validate
{
    protected $rule = [
        'hour' => 'require|number',
        'feeRatio' => 'require|number',
    ];
    
    protected $message=[
        'hour.require' => '小时段不能为空',
        'feeRatio.require' => '费用率不能为空',
        'hour.number'   => '小时段必须为数字',
        'feeRatio.number'   => '费用率必须为数字',
    ];

    protected $scene = [
        'saveCancelFeeRule'  =>  ['hour', 'feeRatio'], // 订单取消费用规则
        'delCancelFeeRule'  =>  ['hour'], // 删除订单取消费用规则
    ];
}
